import request from '@/utils/request'

// 获取部门列表
export function getDepartment() {
  return request.get('/company/department')
}

// 获取部门负责人列表
export function getDepartmentHead() {
  return request.get('/sys/user/simple')
}

// 新增部门请求
export function addNewDepartments(data) {
  console.log(data)
  return request.post('/company/department', data)
}

// 获取部门详情请求
export function getDepartmentDetails(id) {
  return request.get(`/company/department/${id}`)
}

// 获取部门详情请求
export function editorialDepartment(id, data) {
  return request.put(`/company/department/${id}`, data)
}

// 删除部门请求
export function deleteDepartment(id) {
  return request.delete(`/company/department/${id}`)
}
